/**
 * @Author: Bobby
 * @Date: 2021-12-07 14:21:37
 * @LastEditTime: 2022-03-16 15:20:34
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\project\wms\router\index.js
 * @CIMC-V2
 */

import Layout from '@/vui/layouts'
//固定路由
export const constantRoutes = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/components/login'),
    meta: {
      hidden: true,
    },
  },
  {
    path: '/apps',
    name: 'Apps',
    component: () => import('@/components/apps'),
    meta: {
      hidden: true,
    },
  },
  {
    path: '/toapp',
    name: 'ToApp',
    component: () => import('@/components/toapp'),
    meta: {
      hidden: true,
    },
  },
  {
    path: '/403',
    name: '403',
    component: () => import('@/components/403'),
    meta: {
      hidden: true,
    },
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/components/404'),
    meta: {
      hidden: true,
    },
  },
  {
    path: '/resetPassword',
    name: 'resetPassword',
    component: () => import('@/components/resetPassword'),
    meta: {
      hidden: true,
    },
  },
]

// 路由
export const asyncRoutes = [
  //匹配不到 就跳转到404
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'NotFound',
    meta: {
      hidden: true,
    },
  },
  //控制台页
  {
    path: '/',
    name: 'Root',
    component: Layout,
    meta: {
      title: '控制台',
      icon: 'home-2-line',
      breadcrumbHidden: true,
    },
    children: [
      {
        path: 'index',
        name: 'Index',
        component: () => import('../views/index'),
        meta: {
          title: '首页',
          icon: 'home-2-line',
          noClosable: true,
        },
      },
    ],
  },
]
